/*
 * 泛型
 * 设置多个泛型
 */

class Col<K, T> {
    private K key;
    private T value;

    public Col(K key,T value) {
        this.key = key;
        this.value = value;
    }

    public void setValue(T value) {
        this.value = value;
    }

    public T getValue() {
        return value;
    }

    public void setKey(K key) {
        this.key = key;
    }

    public K getKey() {
        return key;
    }
}

public class GenericDemo3 {
    public static void main(String[] args) {
        Col<String, Integer> col = new Col<String, Integer>("这是key", 100);
        System.out.println(col.getKey());
        System.out.println(col.getValue());
    }
}
